home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 34 / Amiga Format CD34 (1998-11-20)(Future Publishing)(GB)[!][Christmas issue].iso / -seriously_amiga- / programming / c / mesa-2.6 / lib / glu.c next >
C/C++ Source or Header  |  1998-10-01  |  6KB  |  197 lines

  1. /*
  2.  * Mesa 3-D graphics library
  3.  * Version:  2.6
  4.  * Copyright (C) 1995-1997  Brian Paul
  5.  *
  6.  * This library is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU Library General Public
  8.  * License as published by the Free Software Foundation; either
  9.  * version 2 of the License, or (at your option) any later version.
  10.  *
  11.  * This library is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.  * Library General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU Library General Public
  17.  * License along with this library; if not, write to the Free
  18.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  */
  20.  
  21.  
  22. /*
  23.  * glu.c
  24.  *
  25.  * Version 1.0  27 Jun 1998
  26.  * by Jarno van der Linden
  27.  * jarno@kcbbs.gen.nz
  28.  *
  29.  * File created from glu.h ver 1.9 using GenProtos
  30.  *
  31.  * Version 1.1  09 Aug 1998
  32.  * by Jarno van der Linden
  33.  * jarno@kcbbs.gen.nz
  34.  *
  35.  * - Added __stdargs to gluLookAt
  36.  *
  37.  * Version 2.0  13 Sep 1998
  38.  * by Jarno van der Linden
  39.  * jarno@kcbbs.gen.nz
  40.  *
  41.  * - Change to using mesamainBase
  42.  * - STUB added to function names, and added
  43.  *   mesamainBase pointers to interface
  44.  *
  45.  */
  46.  
  47.  
  48. #include "gl/gl.h"
  49. #include "gl/glu.h"
  50.  
  51. extern struct Library *mesamainBase;
  52.  
  53.  
  54. extern __asm __saveds void APIENTRY gluLookAtA(register __a0 void *);
  55. #pragma libcall mesamainBase gluLookAtA 972 801
  56.  
  57. __stdargs __saveds void APIENTRY STUBgluLookAt(GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx, GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy, GLdouble upz, struct Library *mesamainBase)
  58. {
  59.     struct gluLookAtArgs {
  60.         GLdouble eyex;
  61.         GLdouble eyey;
  62.         GLdouble eyez;
  63.         GLdouble centerx;
  64.         GLdouble centery;
  65.         GLdouble centerz;
  66.         GLdouble upx;
  67.         GLdouble upy;
  68.         GLdouble upz;
  69.     } args;
  70.  
  71.     args.eyex = eyex;
  72.     args.eyey = eyey;
  73.     args.eyez = eyez;
  74.     args.centerx = centerx;
  75.     args.centery = centery;
  76.     args.centerz = centerz;
  77.     args.upx = upx;
  78.     args.upy = upy;
  79.     args.upz = upz;
  80.  
  81.     gluLookAtA(&args);
  82. }
  83.  
  84.  
  85. extern __asm __saveds GLint APIENTRY gluProjectA(register __a0 void *);
  86. #pragma libcall mesamainBase gluProjectA 98a 801
  87.  
  88. __asm __saveds GLint APIENTRY STUBgluProject(register __fp0 GLdouble objx, register __fp1 GLdouble objy, register __fp2 GLdouble objz, register __a0 const GLdouble modelMatrix[16], register __a1 const GLdouble projMatrix[16], register __a2 const GLint viewport[4], register __a3 GLdouble *winx, register __a4 GLdouble *winy, register __a5 GLdouble *winz, register __a6 struct Library *mesamainBase)
  89. {
  90.     struct gluProjectArgs {
  91.         GLdouble objx;
  92.         GLdouble objy;
  93.         GLdouble objz;
  94.         GLdouble *modelMatrix;
  95.         GLdouble *projMatrix;
  96.         GLint *viewport;
  97.         GLdouble *winx;
  98.         GLdouble *winy;
  99.         GLdouble *winz;
  100.     } args;
  101.  
  102.     args.objx = objx;
  103.     args.objy = objy;
  104.     args.objz = objz;
  105.     args.modelMatrix = modelMatrix;
  106.     args.projMatrix = projMatrix;
  107.     args.viewport = viewport;
  108.     args.winx = winx;
  109.     args.winy = winy;
  110.     args.winz = winz;
  111.  
  112.     return(gluProjectA(&args));
  113. }
  114.  
  115.  
  116. extern __asm __saveds GLint APIENTRY gluUnProjectA(register __a0 void *);
  117. #pragma libcall mesamainBase gluUnProjectA 996 801
  118.  
  119. __asm __saveds GLint APIENTRY STUBgluUnProject(register __fp0 GLdouble winx, register __fp1 GLdouble winy, register __fp2 GLdouble winz, register __a0 const GLdouble modelMatrix[16], register __a1 const GLdouble projMatrix[16], register __a2 const GLint viewport[4], register __a3 GLdouble *objx, register __a4 GLdouble *objy, register __a5 GLdouble *objz, register __a6 struct Library *mesamainBase)
  120. {
  121.     struct gluUnProjectArgs {
  122.         GLdouble winx;
  123.         GLdouble winy;
  124.         GLdouble winz;
  125.         GLdouble *modelMatrix;
  126.         GLdouble *projMatrix;
  127.         GLint *viewport;
  128.         GLdouble *objx;
  129.         GLdouble *objy;
  130.         GLdouble *objz;
  131.     } args;
  132.  
  133.     args.winx = winx;
  134.     args.winy = winy;
  135.     args.winz = winz;
  136.     args.modelMatrix = modelMatrix;
  137.     args.projMatrix = projMatrix;
  138.     args.viewport = viewport;
  139.     args.objx = objx;
  140.     args.objy = objy;
  141.     args.objz = objz;
  142.  
  143.     return(gluUnProjectA(&args));
  144. }
  145.  
  146.  
  147. extern __asm __saveds void APIENTRY gluCylinderA(register __a0 void *);
  148. #pragma libcall mesamainBase gluCylinderA 9e4 801
  149.  
  150. __asm __saveds void APIENTRY STUBgluCylinder(register __a0 GLUquadricObj *qobj, register __fp0 GLdouble baseRadius, register __fp1 GLdouble topRadius, register __fp2 GLdouble height, register __d0 GLint slices, register __d1 GLint stacks, register __a1 struct Library *mesamainBase)
  151. {
  152.     struct gluCylinderArgs {
  153.         GLUquadricObj *qobj;
  154.         GLdouble baseRadius;
  155.         GLdouble topRadius;
  156.         GLdouble height;
  157.         GLint slices;
  158.         GLint stacks;
  159.     } args;
  160.  
  161.     args.qobj = qobj;
  162.     args.baseRadius = baseRadius;
  163.     args.topRadius = topRadius;
  164.     args.height = height;
  165.     args.slices = slices;
  166.     args.stacks = stacks;
  167.  
  168.     gluCylinderA(&args);
  169. }
  170.  
  171.  
  172. extern __asm __saveds void APIENTRY gluPartialDiskA(register __a0 void *);
  173. #pragma libcall mesamainBase gluPartialDiskA 9fc 801
  174.  
  175. __asm __saveds void APIENTRY STUBgluPartialDisk(register __a0 GLUquadricObj *qobj, register __fp0 GLdouble innerRadius, register __fp1 GLdouble outerRadius, register __d0 GLint slices, register __d1 GLint loops, register __fp2 GLdouble startAngle, register __fp3 GLdouble sweepAngle, register __a1 struct Library *mesamainBase)
  176. {
  177.     struct gluPartialDiskArgs {
  178.         GLUquadricObj *qobj;
  179.         GLdouble innerRadius;
  180.         GLdouble outerRadius;
  181.         GLint slices;
  182.         GLint loops;
  183.         GLdouble startAngle;
  184.         GLdouble sweepAngle;
  185.     } args;
  186.  
  187.     args.qobj = qobj;
  188.     args.innerRadius = innerRadius;
  189.     args.outerRadius = outerRadius;
  190.     args.slices = slices;
  191.     args.loops = loops;
  192.     args.startAngle = startAngle;
  193.     args.sweepAngle = sweepAngle;
  194.  
  195.     gluPartialDiskA(&args);
  196. }
  197.